// JavaScript Document
;(function(){
var HightCode=function(){}	
	window.HightCode          = HightCode;			
})()

HightCode.StFormatNumber=function ($a){
		if($a<10){return "0000"+$a;}	if($a<100){return "000"+$a;}	
		if($a<1000){return "00"+$a;}	if($a<10000){return "0"+$a;}	
		if($a<100000){return ""+$a;}	
}
//将字符串代码以回车分裂成数组
HightCode.split=function(ss){
	return ss.split("\n");
}
//arrIntoTable方法将数组元素加入table tr td 标签换化为一个新的数组	
HightCode.arrIntoTable=function (arr){

	if( typeof arr === 'string'){
	  arr	=HightCode.split(arr);
	}
	var newarr=new Array();
	newarr[0]='<pre><table   border="0" cellspacing="0" cellpadding="0">';
for(i=0;i<arr.length;i++){
    if( (i%2)==0){var $bgcolor="#f0f0f0;";}else{var $bgcolor="#fcfcfc;";}
	newarr[i+1]="<tr ><td  class='num' "
	+"style='display:block;color:#999;font-size:18px;width:65px;overflow:hidden;'><b>"
	+ HightCode.StFormatNumber(i)
	+"</b></td><td style='border-color:#33cc33;width:4000px; border-left-style:solid; border-left-width:4px;"
	+"height:18px; padding-left:2px;background-color:"+$bgcolor+"'>"
	+BASE.highKey(arr[i]);
	+"</td></tr>";
	}
	 
		i++;
	newarr[arr.length+1]="</table></pre>";
	return newarr;
}

HightCode.arr2str=function(arr){
	return arr.join('\n');
}
//进一步处理arrIntoTable方法的返回值，返回一个内容为表格的字符串
HightCode.arr2TableStr=function(arr){
	return HightCode.arrIntoTable(arr).join('\n');
}